package com.zhehekeji.opsys.api.webservice.server;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import org.apache.cxf.rs.security.cors.CrossOriginResourceSharing;

import com.zhehekeji.opsys.api.resp.GetSigninExchangeListResp;
import com.zhehekeji.opsys.api.resp.GetSigninPictureListResp;
import com.zhehekeji.opsys.api.resp.GetSigninPictureResp;
import com.zhehekeji.opsys.api.resp.GetSigninPrizeDetailResp;
import com.zhehekeji.opsys.api.resp.GetSigninPrizeListResp;
import com.zhehekeji.opsys.api.resp.GetSigninProductDetailResp;
import com.zhehekeji.opsys.api.resp.GetSigninProductListResp;
import com.zhehekeji.opsys.api.resp.GetSigninRecordResp;
import com.zhehekeji.opsys.api.resp.LuckySigninResp;

/**
 * @ClassName SigninManager
 * @Description 签到管理
 * @author chenweiliu chenwei.liu@163.com
 * @date 2016-7-12   下午3:31:58
 */
@Path(value="/")
@WebService
@CrossOriginResourceSharing(allowAllOrigins=true)
public interface SigninManager {
	
	@GET
	@Path(value="getSigninPicture")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninPicture",operationName="getSigninPicture")
    GetSigninPictureResp getSigninPicture(@WebParam(name="pictureCode")@QueryParam(value="pictureCode")String pictureCode);
	
	
	@GET
	@Path(value="getLatestSigninPicture")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetLatestSigninPicture",operationName="getLatestSigninPicture")
	GetSigninPictureResp getLatestSigninPicture(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode);
	
	
	@GET
	@Path(value="getSigninPictureList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninPictureList",operationName="getSigninPictureList")
	GetSigninPictureListResp getSigninPictureList(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode,
			@WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex, 
			@WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);
	
	@GET
	@Path(value="getSigninPictureByAboveTime")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninPictureByAboveTime",operationName="getSigninPictureByAboveTime")
	GetSigninPictureResp getSigninPictureByAboveTime(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode,
			@WebParam(name="aboveTime")@QueryParam(value="aboveTime")String aboveTime,
			@WebParam(name="epgType")@QueryParam(value="epgType")int epgType);
	
	@GET
	@Path(value="getSigninPrizeList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninPrizeList",operationName="getSigninPrizeList")
    GetSigninPrizeListResp getSigninPrizeList(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode);
	
	@GET
	@Path(value="getSigninPrizeDetail")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninPrizeDetail",operationName="getSigninPrizeDetail")
    GetSigninPrizeDetailResp getSigninPrizeDetail(@WebParam(name="prizeCode")@QueryParam(value="prizeCode")String prizeCode);

	@GET
	@Path(value="getSigninProductList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninProductList",operationName="getSigninProductList")
    GetSigninProductListResp getSigninProductList(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode);
	
	@GET
	@Path(value="getSigninProductDetail")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninProductDetail",operationName="getSigninProductDetail")
	GetSigninProductDetailResp getSigninProductDetail(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode, 
			@WebParam(name="productID")@QueryParam(value="productID")String productID);
	
	@GET
	@Path(value="getSigninUser")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninUser",operationName="getSigninUser")
	LuckySigninResp getSigninUser(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode, 
			@WebParam(name="userID")@QueryParam(value="userID")String userID);
	
	@GET
	@Path(value="getSigninExchangeList")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninExchangeList",operationName="getSigninExchangeList")
    GetSigninExchangeListResp getSigninExchangeList(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode,
                                                    @WebParam(name="userID")@QueryParam(value="userID")String userID,
                                                    @WebParam(name="prizeCode")@QueryParam(value="prizeCode")String prizeCode,
                                                    @WebParam(name="firstIndex")@QueryParam(value="firstIndex")int firstIndex,
                                                    @WebParam(name="maxResult")@QueryParam(value="maxResult")int maxResult);

	
	@GET
	@Path(value="initSigninUser")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doInitSigninUser",operationName="initSigninUser")
	LuckySigninResp initSigninUser(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode, 
			@WebParam(name="userID")@QueryParam(value="userID")String userID,
			@WebParam(name="productID")@QueryParam(value="productID")String productID);
	
	@GET
	@Path(value="luckySignin")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doLuckySignin",operationName="luckySignin")
	LuckySigninResp luckySignin(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode,
			@WebParam(name="userID")@QueryParam(value="userID")String userID, 
			@WebParam(name="productID")@QueryParam(value="productID")String productID,
			@WebParam(name="signinTime")@QueryParam(value="signinTime")String signinTime,
			@WebParam(name="randomStr")@QueryParam(value="randomStr")String randomStr);
	
	@GET
	@Path(value="exchangePrize")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doExchangePrize",operationName="exchangePrize")
	LuckySigninResp exchangePrize(@WebParam(name="prizeCode")@QueryParam(value="prizeCode")String prizeCode,
			@WebParam(name="userID")@QueryParam(value="userID")String userID);
	
	@GET
	@Path(value="updateSigninUser")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doUpdateSigninUser",operationName="updateSigninUser")
	LuckySigninResp updateSigninUser(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode, 
			@WebParam(name="userID")@QueryParam(value="userID")String userID,
			@WebParam(name="mobileNo")@QueryParam(value="mobileNo")String mobileNo);
	
	@GET
	@Path(value="getSigninRecord")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninRecord",operationName="getSigninRecord")
	GetSigninRecordResp getSigninRecord(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode,
			@WebParam(name="userID")@QueryParam(value="userID")String userID, 
			@WebParam(name="startDay")@QueryParam(value="startDay")String startDay,
			@WebParam(name="endDay")@QueryParam(value="endDay")String endDay);
	
	@GET
	@Path(value="getCurrentDaySigninRecord")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetCurrentDaySigninRecord",operationName="getCurrentDaySigninRecord")
	GetSigninRecordResp getCurrentDaySigninRecord(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode,
			@WebParam(name="userID")@QueryParam(value="userID")String userID);
	
	@GET
	@Path(value="getSigninRecordByProductID")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetSigninRecordByProductID",operationName="getSigninRecordByProductID")
	GetSigninRecordResp getSigninRecordByProductID(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode,
			@WebParam(name="productID")@QueryParam(value="productID")String productID, 
			@WebParam(name="userID")@QueryParam(value="userID")String userID, 
			@WebParam(name="startDay")@QueryParam(value="startDay")String startDay,
			@WebParam(name="endDay")@QueryParam(value="endDay")String endDay);
	
	@GET
	@Path(value="getCurrentDaySigninRecordByProductID")
	@Produces(value=MediaType.APPLICATION_JSON )
	@WebMethod(action="doGetCurrentDaySigninRecordByProductID",operationName="getCurrentDaySigninRecordByProductID")
	GetSigninRecordResp getCurrentDaySigninRecordByProductID(@WebParam(name="signinCode")@QueryParam(value="signinCode")String signinCode,
			@WebParam(name="productID")@QueryParam(value="productID")String productID, 
			@WebParam(name="userID")@QueryParam(value="userID")String userID);
	
}

